import request from '@/utils/request'

export function getQuantity() {
  return request({
    url: "/home/quantity",
    method: "get"
  })
}

export function getTypeRate() {
  return request({
    url: "/home/type-percent",
    method: "get"
  })
}

export function getTipsListData(status) {
  return request({
    url: `/home/list?status=${status}`,
    method: "get"
  })
}

export function addTips(data) {
  return request({
    url: `/home/short-note/add-or-update`,
    method: "post",
    data: data
  })
}

export function getApps() {
  return request({
    url: "/home/application/manage",
    method: "get"
  })
}

export function upDateApp(data) {
  return request({
    url: "/home/application/install-and-uninstall",
    method: "post",
    data: data
  })
}

export function getToolsListData() {
  return request({
    url: "/home/application/tool",
    method: "get"
  })
}

export function getAppsCountListData() {
  return request({
    url: "/home/application/frequency",
    method: "get"
  })
}

export function getLinkInfoData(key) {
  return request({
    url: `/system/config/configKey/${key}`,
    method: "get"
  })
}

export function addUse(id) {
  return request({
    url: `/application/add/use?applicationInfoId=${id}`,
    method: "get"
  })
}

export function removeTip(data) {
  return request({
    url: `/home/short-note/delete`,
    method: "post",
    data: data
  })
}
